Programmatically generating a graphical program in response to user input

ABSTRACT

A system and method for programmatically generating a graphical program or a portion of a graphical program in response to receiving user input. The user input may specify functionality of the graphical program or graphical program portion to be generated. In response to the user input, a graphical program (or graphical program portion) that implements the specified functionality may be programmatically generated. Thus, different graphical programs may be generated, depending on the user input received.

PRIORITY CLAIM

This application is a continuation of U.S. patent application Ser. No.09/886,455 titled, “System and Method for Programmatically Generating aGraphical Program in Response to User Input”, filed Jun. 20, 2001, nowU.S. Pat. No. 7,120,876 whose inventors were Jeffrey D. Washington, RamKudukoli, Robert E. Dye, and Paul F. Austin, which is acontinuation-in-part of and claims priority to U.S. patent applicationSer. No. 09/745,023 titled, “System and Method for ProgrammaticallyGenerating a Graphical Program in Response to Program Information,”filed Dec. 20, 2000, now U.S. Pat. No. 7,210,117 whose inventors wereRam Kudukoli, Robert Dye, Paul F. Austin, Lothar Wenzel and Jeffrey L.Kodosky, which claims benefit of priority of U.S. patent applicationSer. No. 09/518,492 titled “System and Method for ProgrammaticallyCreating a Graphical Program”, filed Mar. 3, 2000, whose inventors wereRam Kudukoli, Robert Dye, Melanie Jensen, and Yumiko Kawachi, whichclaims benefit of priority of U.S. provisional Patent Application Ser.No. 60/149,943 titled “System and Method for Programmatically Creating aGraphical Program,” filed Aug. 19, 1999, whose inventors were RobertDye, Melanie Jensen, Ram Kudukoli, and Yumiko Kawachi.

U.S. patent application Ser. No. 09/745,023 is also acontinuation-in-part of U.S. patent application Ser. No. 09/595,003titled “System and Method for Automatically Generating a GraphicalProgram to Implement a Prototype”, filed Jun. 13, 2000, whose inventorswere Nicolas Vazquez, Jeffrey L. Kodosky, Ram Kudukoli, Kevin L.Schultz, Dinesh Nair, Christophe Caltagirone.

FIELD OF THE INVENTION

The present invention relates to the field of graphical programming, andmore particularly to a system and method for programmatically generatinga graphical program in response to user input specifying functionalityof the graphical program.

DESCRIPTION OF THE RELATED ART

Traditionally, high level text-based programming languages have beenused by programmers in writing application programs. Many different highlevel programming languages exist, including BASIC, C, Java, FORTRAN,Pascal, COBOL, ADA, APL, etc. Programs written in these high levellanguages are translated to the machine language level by translatorsknown as compilers or interpreters. The high level programming languagesin this level, as well as the assembly language level, are referred toherein as text-based programming environments.

Increasingly, computers are required to be used and programmed by thosewho are not highly trained in computer programming techniques. Whentraditional text-based programming environments are used, the user'sprogramming skills and ability to interact with the computer systemoften become a limiting factor in the achievement of optimal utilizationof the computer system.

There are numerous subtle complexities which a user must master beforehe can efficiently program a computer system in a text-basedenvironment. The task of programming a computer system to model orimplement a process often is further complicated by the fact that asequence of mathematical formulas, mathematical steps or otherprocedures customarily used to conceptually model a process often doesnot closely correspond to the traditional text-based programmingtechniques used to program a computer system to model such a process. Inother words, the requirement that a user program in a text-basedprogramming environment places a level of abstraction between the user'sconceptualization of the solution and the implementation of a methodthat accomplishes this solution in a computer program. Thus, a useroften must substantially master different skills in order to bothconceptualize a problem or process and then to program a computer toimplement a solution to the problem or process. Since a user often isnot fully proficient in techniques for programming a computer system ina text-based environment to implement his solution, the efficiency withwhich the computer system can be utilized often is reduced.

Examples of fields in which computer systems are employed to interactwith physical systems are the fields of instrumentation, processcontrol, industrial automation, and simulation. Computer measurement andcontrol of devices such as instruments or industrial automation hardwarehas become increasingly desirable in view of the increasing complexityand variety of instruments and devices available for use. However, dueto the wide variety of possible testing and control situations andenvironments, and also the wide array of instruments or devicesavailable, it is often necessary for a user to develop a custom programto control a desired system.

As discussed above, computer programs used to control such systemstraditionally had to be written in text-based programming languages suchas, for example, assembly language, C, FORTRAN, BASIC, etc. Traditionalusers of these systems, however, often were not highly trained inprogramming techniques and, in addition, text-based programminglanguages were not sufficiently intuitive to allow users to use theselanguages without training. Therefore, implementation of such systemsfrequently required the involvement of a programmer to write softwarefor control and analysis of instrumentation or industrial automationdata. Thus, development and maintenance of the software elements inthese systems often proved to be difficult.

U.S. Pat. Nos. 4,901,221; 4,914,568; 5,291,587; 5,301,301; and5,301,336; among others, to Kodosky et al disclose a graphical systemand method for modeling a process, i.e., a graphical programmingenvironment which enables a user to easily and intuitively model aprocess. The graphical programming environment disclosed in Kodosky etal can be considered a higher and more intuitive way in which tointeract with a computer. A graphically based programming environmentcan be represented at a level above text-based high level programminglanguages such as C, Basic, Java, etc.

The method disclosed in Kodosky et al allows a user to construct adiagram using a block diagram editor. The block diagram may include aplurality of interconnected icons such that the diagram createdgraphically displays a procedure or method for accomplishing a certainresult, such as manipulating one or more input variables and/orproducing one or more output variables. The diagram may have one or moreof data flow, control flow and/or execution flow representations. Inresponse to the user constructing a diagram or graphical program usingthe block diagram editor, data structures may be automaticallyconstructed which characterize an execution procedure which correspondsto the displayed procedure. The graphical program may be compiled orinterpreted by a computer.

Therefore, Kodosky et al teaches a graphical programming environmentwherein a user places or manipulates icons and interconnects or “wiresup” the icons in a block diagram using a block diagram editor to createa graphical “program.” A graphical program for measuring, controlling,or modeling devices, such as instruments, processes or industrialautomation hardware, or for modeling or simulating devices, may bereferred to as a virtual instrument (VI). Thus, a user can create acomputer program solely by using a graphically based programmingenvironment. This graphically based programming environment may be usedfor creating virtual instrumentation systems, modeling processes,control, simulation and numerical analysis, as well as for any type ofgeneral programming.

In creating a graphical program, a user may create a front panel or userinterface panel. The front panel may include various user interfaceelements or front panel objects, such as controls and/or indicators,that represent or display the respective input and output that will beused by the graphical program or VI, and may include other icons whichrepresent devices being controlled. The front panel may be comprised ina single window of user interface elements, or may comprise a pluralityof individual windows each having a user interface element, wherein theindividual windows may optionally be tiled together. When the controlsand indicators are created in the front panel, corresponding icons orterminals may be automatically created in the block diagram by the blockdiagram editor. Alternatively, the user can place terminal icons in theblock diagram which may cause the display of corresponding front panelobjects in the front panel, either at edit time or later at run time. Asanother example, the front panel objects, e.g., the GUI, may be embeddedin the block diagram.

During creation of the block diagram portion of the graphical program,the user may select various function nodes or icons that accomplish hisdesired result and connect the function nodes together. For example, thefunction nodes may be connected in one or more of a data flow, controlflow, and/or execution flow format. The function nodes may also beconnected in a “signal flow” format, which is a subset of data flow. Thefunction nodes may be connected between the terminals of the varioususer interface elements, e.g., between the respective controls andindicators. Thus the user may create or assemble a graphical program,referred to as a block diagram, graphically representing the desiredprocess. The assembled graphical program may be represented in thememory of the computer system as data structures. The assembledgraphical program, i.e., these data structures, may then be compiled orinterpreted to produce machine language that accomplishes the desiredmethod or process as shown in the block diagram.

Input data to a graphical program may be received from any of varioussources, such as from a device, unit under test, a process beingmeasured or controlled, another computer program, or from a file. Also,a user may input data to a graphical program or virtual instrument usingfront panel controls. This input data may propagate through the dataflow block diagram or graphical program and appear as changes on theoutput indicators. In an instrumentation application, the front panelcan be analogized to the front panel of an instrument. In an industrialautomation application the front panel can be analogized to the MMI (ManMachine Interface) of a device. The user may adjust the controls on thefront panel to affect the input and view the output on the respectiveindicators. Alternatively, the front panel may be used merely to viewthe input and output, or just the output, and the input may not beinteractively manipulable by the user during program execution.

Thus, graphical programming has become a powerful tool available toprogrammers. Graphical programming environments such as the NationalInstruments LabVIEW product have become very popular. Tools such asLabVIEW have greatly increased the productivity of programmers, andincreasing numbers of programmers are using graphical programmingenvironments to develop their software applications. In particular,graphical programming tools are being used for test and measurement,data acquisition, process control, man machine interface (MMI),supervisory control and data acquisition (SCADA) applications,simulation, machine vision applications, and motion control, amongothers.

As graphical programming environments have matured and grown inpopularity and complexity, it has become increasingly desirable toprovide high-level tools which help a user create a graphical program.It also becomes increasingly desirable to integrate graphicalprogramming environments with other applications and programmingenvironments. In order to provide the desired tools or the desiredintegration, it would be greatly desirable to provide the ability todynamically or programmatically generate a graphical program or aportion of a graphical program. For example, for various applications,it would be desirable to provide various types of program information toa program, wherein the program information specifies functionality of agraphical program (or portion of a graphical program) to beprogrammatically generated.

As described above, a user typically creates a graphical program withina graphical programming environment by interactively or manually placingicons or nodes representing the desired blocks of functionality on adiagram, and connecting the icons/nodes together to represent one ormore of the data flow, control flow, and/or execution flow of theprogram. The ability to programmatically generate a graphical program inresponse to program information would enable a graphical program orgraphical program portion to automatically be generated without thistype of interactive user input. For example, it would be desirable forthe user to be able to specify program functionality at a high level viaone or more graphical user interface (GUI) panels, and to thenprogrammatically generate a graphical program or graphical programportion implementing the specified program functionality.

SUMMARY OF THE INVENTION

One embodiment of the present invention comprises a system and methodfor programmatically generating a graphical program or a portion of agraphical program, in response to receiving user input. The user inputmay specify functionality of the graphical program or graphical programportion to be generated. A graphical program generation program,referred to herein as a “GPG program”, may be executed, wherein the GPGprogram may be operable to receive the user input. The user input maycomprise any type of information that specifies functionality of oraspects of the graphical program desired to be created. In response tothe user input, the GPG program may programmatically generate agraphical program (or graphical program portion) that implements thespecified functionality. Thus, the GPG program may generate differentgraphical programs, depending on the user input received.

In programmatically generating a graphical program, the GPG program mayprogrammatically generate a block diagram portion comprising a pluralityof connected icons or nodes, wherein the connected icons or nodes mayvisually or graphically indicate the functionality of the graphicalprogram. The GPG program may also programmatically generate a userinterface panel or front panel which may be used to provide input toand/or display output from the graphical program. For example, the GPGprogram may be constructed to programmatically generate one or more of aLabVIEW program, a VEE program, a Simulink program, etc.

The GPG program that generates the graphical program may be constructedusing any of various programming languages, methodologies, ortechniques. For example, the GPG program may itself be a graphicalprogram, or the GPG program may be a text-based program, or the GPGprogram may be constructed using a combination of graphical andtext-based programming environments.

Also, the GPG program may have any of various purposes or applications.In one embodiment, the GPG program may include or be associated with aprogram or application that directly aids the user in creating agraphical program. For example, the GPG program may be included in agraphical programming development environment application. In this casethe graphical programming development environment application may beoperable to receive user input specifying desired functionality and theGPG program may automatically, i.e., programmatically, add a portion ofgraphical program code implementing the specified functionality to theuser's program. The user input may be received, for example, via one ormore “wizard” graphical user interface (GUI) input panels or dialogsenabling the user to specify various options. Such graphical programcode generation wizards may greatly simplify the user's task ofimplementing various operations. As an example, it is often difficultfor developers of instrumentation applications to properly implementcode to analyze an acquired signal, due to the inherent complexityinvolved. By enabling the developer to easily specify the desiredfunctionality through a high-level user interface, the GPG program canreceive this information and automatically create graphical code toimplement the signal analysis. Furthermore, since the graphical code isgenerated programmatically, the code may be optimized, resulting in anefficient program and a readable block diagram without unnecessary code.

In various embodiments, an association between a generated graphicalprogram and the received user input used in generating the graphicalprogram may be maintained. For example, this association may enable theuser to return from the programmatically generated graphical program (orportion) to the GUI input panel(s) originally used to specify the userinput, e.g., in order to modify the programmatically generated graphicalprogram (or portion). In one embodiment, a generated graphical programmay be “locked”, requiring the user to explicitly unlock the graphicalprogram before the graphical program can be modified.

In various embodiments, the GPG program may be operable to generate anyof various types of graphical programs. For example, as discussed above,a generated graphical program may be targeted toward a particulargraphical programming development environment application. The GPGprogram may thus utilize proprietary features or create files that areformatted in a manner expected by the graphical programming developmentenvironment. This may be desirable or necessary when the graphicalprogramming development environment includes a runtime environment thatis required for the created graphical program to execute. Examples ofgraphical programming development environments include LabVIEW,BridgeVIEW, DasyLab, and DiaDem from National Instruments, VEE fromHewlett Packard, Simulink from The MathWorks, Softwire from MeasurementComputing, Inc., Sanscript from Northwoods Software, WiT from Coreco,and Vision Program Manager from PPT Vision, among others.

In various embodiments, the graphical program may be generated using anyof various methods or techniques. Generating the graphical program maycomprise generating one or more files or data structures defining thegraphical program. When a user interactively develops a graphicalprogram from within a graphical programming environment, the graphicalprogramming environment may create one or more program files. Forexample, the program files may specify information such as a set ofnodes that the graphical program uses, interconnections among thesenodes, programmatic structures such as loops, etc. In other cases, theprogram files may store various data structures, e.g., in binary form,which the graphical programming environment uses to directly representthe graphical program. Thus, in programmatically generating thegraphical program, the GPG program may programmatically generate one ormore files or data structures representing the graphical program,wherein these files may be structured or formatted appropriately for aparticular graphical programming environment.

In one embodiment, a graphical programming development environment mayprovide an application programming interface (API) which the GPG programcan use to programmatically generate the graphical program. For example,for each node, user interface element, or other object of the graphicalprogram, the API may be called to programmatically add the object to thegraphical program, connect the object to other objects of the graphicalprogram, etc. Thus, any necessary files or other constructs needed bythe graphical programming environment in order to use the generatedgraphical program may be automatically created as a result of callingthe API.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description of the preferred embodiment is consideredin conjunction with the following drawings, in which:

FIG. 1 illustrates a computer system connected through a network to asecond computer system;

FIGS. 2A and 2B illustrate representative instrumentation and processcontrol systems including various I/O interface options;

FIG. 3 is a block diagram of the computer system of FIGS. 1, 2A and 2B;

FIG. 4 is a flowchart diagram illustrating one embodiment of a methodfor programmatically generating a graphical program in response toreceiving program information;

FIG. 5 is a block diagram illustrating that a “GPG program” whichprogrammatically generates a graphical program may be a program for anyof various purposes and may receive information of any type to use ingenerating the graphical program;

FIG. 6 is a flowchart diagram illustrating one embodiment of a methodfor programmatically generating a graphical program in response to userinput received via a graphical user interface;

FIG. 7 is a flowchart diagram illustrating one embodiment of a methodfor programmatically generating graphical source code associated with aparticular node;

FIG. 8 illustrates an exemplary GUI input panel for configuring awaveform generator node;

FIGS. 9-14 show a simple example illustrating the concept ofprogrammatically generating different graphical source code portions fora node in response to receiving user input for configuring the node;

FIG. 15 is a flowchart diagram illustrating one embodiment of a methodfor programmatically replacing graphical source code associated with aparticular node;

FIG. 16 is a flowchart diagram illustrating one embodiment of a methodfor creating a graphical program based on a pre-defined program process;

FIGS. 17-19 illustrate exemplary GUI windows for displaying programprocesses such as those related to the test and measurement andindustrial automation fields;

FIG. 20 illustrates a graphical program that was programmaticallycreated based on a pre-defined program process;

FIG. 21 illustrates a GUI input panel for configuring a node in thegraphical program of FIG. 20;

FIG. 22 is a flowchart diagram illustrating one embodiment of animproved method for connecting input/output terminals of a graphicalprogram node to data sources/targets in the graphical program;

FIG. 23 illustrates a prior art graphical program including variousnodes with wires leading to input terminals of the nodes or leading fromoutput terminals of the nodes;

FIGS. 24 and 25 illustrate graphical programs having nodes withterminals displayed as labels under the nodes;

FIG. 26 is a flowchart diagram illustrating one embodiment of a methodfor specifying an alias for input/output terminals of a node;

FIGS. 27 and 29 illustrate a node available for inclusion in a graphicalprogram referred to herein as a “collector node”;

FIG. 28 illustrates an exemplary GUI input panel for configuring thecollector nodes shown in FIGS. 27 and 29;

FIGS. 30-33 illustrate exemplary graphical programs using collectornodes; and

FIG. 34 illustrates a prior art graphical program which does not use acollector node.

While the invention is susceptible to various modifications andalternative forms specific embodiments are shown by way of example inthe drawings and are herein described in detail. It should be understoodhowever, that drawings and detailed description thereto are not intendedto limit the invention to the particular form disclosed, but on thecontrary the invention is to cover all modifications, equivalents andalternative following within the spirit and scope of the presentinvention as defined by the appended claims.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Incorporation by Reference

The following references are hereby incorporated by reference in theirentirety as though fully and completely set forth herein.

U.S. Pat. No. 5,481,741 titled “Method and Apparatus for ProvidingAttribute Nodes in a Graphical Data Flow Environment,” issued on Jan. 2,1996.

U.S. Pat. No. 6,064,812 titled “System and Method for DevelopingAutomation Clients Using a Graphical Data Flow Program,” issued on May16, 2000.

U.S. Pat. No. 6,102,965 titled “System and Method for ProvidingClient/Server Access to Graphical Programs,” issued on Aug. 15, 2000.

U.S. patent application Ser. No. 09/136,123 titled “System and Methodfor Accessing Object Capabilities in a Graphical Program” filed Aug. 18,1998.

U.S. patent application Ser. No. 09/518,492 titled “System and Methodfor Programmatically Creating a Graphical Program”, filed Mar. 3, 2000.

U.S. patent application Ser. No. 09/595,003 titled “System and Methodfor Automatically Generating a Graphical Program to Implement aPrototype,” filed Jun. 13, 2000.

U.S. patent application Ser. No. 09/745,023 titled “System and Methodfor Programmatically Generating a Graphical Program in Response toProgram Information,” filed Dec. 20, 2000.

U.S. patent application Ser. No. 08/912,445 titled “Embedded GraphicalProgramming System” filed on Aug. 18, 1997, whose inventors were JeffreyL. Kodosky, Darshan Shah, Samson DeKey, and Steve Rogers.

U.S. patent application Ser. No. 08/912,427 titled “System and Methodfor Converting Graphical Programs Into Hardware Implementations” filedon Aug. 18, 1997, whose inventors were Jeffrey L. Kodosky, Hugo Andrade,Brian Keith Odom, and Cary Paul Butler.

FIG. 1—Computer System Connected to a Network

FIG. 1 illustrates an exemplary computer network in which a computersystem 82 is connected through a network 84 to a second computer system86. The computer system 82 and the second computer system 86 can be anyof various types, as desired. The network 84 can also be any of varioustypes, including a LAN (local area network), WAN (wide area network), orthe Internet, among others.

The computer system 82 may include or store a computer program, referredto herein as a graphical program generation program, or a “GPG program”,that is operable to receive program information and programmaticallygenerate a graphical program based on the program information. Oneembodiment of a method for programmatically generating a graphicalprogram is described below.

In one embodiment, the GPG program may be implemented as aself-contained program or application that includes all necessaryprogram logic for generating the graphical program. In anotherembodiment, the GPG program may comprise a client portion and a serverportion (or client program and server program), wherein the clientportion may request or direct the server portion to generate thegraphical program. For example, the client portion may utilize anapplication programming interface (API) provided by the server portionin order to generate the graphical program. In other words, the clientportion may perform calls to the API provided by the server portion, andthe server portion may execute functions or routines bound to thesecalls to generate the graphical program. In one embodiment, the serverportion may be an instance of a graphical programming developmentenvironment application. For example, the LabVIEW graphical programmingdevelopment environment application enables client programs to interfacewith a LabVIEW server in order to programmatically generate or modifygraphical programs.

As used herein, the term “GPG program” is intended to include any ofvarious implementations of a program (or programs) that are executableto programmatically generate a graphical program based on receivedprogram information. For example, the term “GPG program” is intended toinclude an embodiment in which the GPG program is a self-containedprogram or application (not implemented as a client/server program) thatincludes all necessary program logic for programmatically generating agraphical program. The term “GPG program” is also intended to include anembodiment in which a combination of a client portion (or clientprogram) and server portion (or server program) operate together toprogrammatically generate the graphical program. The term “GPG program”is also intended to include other program implementations.

In an embodiment in which a client program interfaces with a serverprogram to generate the graphical program, the server program mayexecute on the same computer system as the client program or may executeon a different computer system, e.g., a different computer systemconnected via a network. For example, in FIG. 1, the client program mayexecute on the computer system 82, and the server program may execute onthe computer system 86. In this case, the graphical program, e.g., filesrepresenting the graphical program may be created on the computer system82, or 86, or on a different computer system.

It is noted that the GPG program may be implemented using any of variousprogramming technologies or methodologies. Where the GPG program isimplemented as client and server programs, each of these programs mayutilize procedure-based techniques, component-based techniques, and/orobject-oriented techniques, among others. The programs may be writtenusing any combination of text-based or graphical programming languages.Also, the programs may be written using distributed modules orcomponents so that each program may reside on any combination ofcomputer system 82, computer system 86, and other computer systemsconnected to the network 84. Also, in various embodiments, the clientprogram may interface with the server program through a proxy softwarecomponent or program.

FIGS. 2A and 2B—Instrumentation and Industrial Automation Systems

FIGS. 2A and 2B illustrate exemplary systems which may store or use aGPG program and/or a server program which are operable toprogrammatically generate a graphical program. Also, these systems mayexecute a programmatically generated graphical program. For example, thegraphical program may perform an instrumentation function, such as atest and measurement function or an industrial automation function. Itis noted that the GPG program, the server program, and/or a generatedgraphical program may be stored in or used by any of various other typesof systems as desired and may implement any function or application asdesired. Thus, FIGS. 2A and 2B are exemplary only.

FIG. 2A illustrates an exemplary instrumentation control system 100. Thesystem 100 comprises a host computer 102 which connects to one or moreinstruments. The host computer 102 may comprise a CPU, a display screen,memory, and one or more input devices such as a mouse or keyboard asshown. The computer 102 connects through the one or more instruments toanalyze, measure, or control a unit under test (UUT) or process 150. Inone embodiment, the computer 102 may be either of the computers 82 or 86shown in FIG. 1, which as described above are operable toprogrammatically generate graphical programs based on receivedinformation. Also, in one embodiment, the computer 102 may execute agenerated graphical program, such as a graphical program that controlsor models one or more of the connected instruments.

The one or more instruments may include one or more of a GPIB instrument112 and associated GPIB interface card 122, a data acquisition board 114and associated signal conditioning circuitry 124, a VXI instrument 116,a PXI instrument 118, a video device 132 and associated imageacquisition card 134, a motion control device 136 and associated motioncontrol interface card 138, and/or one or more computer based instrumentcards 142, among other types of devices.

The GPIB instrument 112 may be coupled to the computer 102 via the GPIBinterface card 122 comprised in the computer 102. In a similar manner,the video device 132 may be coupled to the computer 102 via the imageacquisition card 134, and the motion control device 136 may be coupledto the computer 102 through the motion control interface card 138. Thedata acquisition board 114 may be coupled to the computer 102, and mayinterface through signal conditioning circuitry 124 to the UUT. Thesignal conditioning circuitry 124 preferably comprises an SCXI (SignalConditioning eXtensions for Instrumentation) chassis comprising one ormore SCXI modules 126.

The GPIB card 122, the image acquisition card 134, the motion controlinterface card 138, and the DAQ card 114 are typically plugged in to anI/O slot in the computer 102, such as a PCI bus slot, a PC Card slot, oran ISA, EISA or MicroChannel bus slot provided by the computer 102.However, these cards 122, 134, 138 and 114 are shown external tocomputer 102 for illustrative purposes.

The VXI chassis or instrument 116 may be coupled to the computer 102 viaa VXI bus, MXI (e.g., MXI-3) bus, or other serial or parallel busprovided by the computer 102. The computer 102 preferably includes VXIinterface logic, such as a VXI, MXI or GPIB interface card (not shown),which interfaces to the VXI chassis 116. The PXI chassis or instrumentis preferably coupled to the computer 102 through the computer's PCIbus.

A serial instrument (not shown) may also be coupled to the computer 102through a serial port, such as an RS-232 port, USB (Universal Serialbus) or IEEE 1394 or 1394.2 bus, provided by the computer 102.

In typical instrumentation control systems an instrument will not bepresent of each interface type, and in fact many systems may only haveone or more instruments of a single interface type, such as only GPIBinstruments. The one or more instruments are coupled to the unit undertest (UUT) or process 150, or are coupled to receive field signals,typically generated by transducers. The system 100 may be used in a dataacquisition and control application, in a test and measurementapplication, a process control application, a man-machine interfaceapplication, or other types of applications.

FIG. 2B illustrates an exemplary industrial automation system 160. Theindustrial automation system 160 is similar to the instrumentation ortest and measurement system 100 shown in FIG. 2A. Elements which aresimilar or identical to elements in FIG. 2A have the same referencenumerals for convenience. The system 160 may comprise a computer 102which connects to one or more devices or instruments. The computer 102may comprise a CPU, a display screen, memory, and one or more inputdevices such as a mouse or keyboard as shown. The computer 102 mayconnect through the one or more devices to a process or device 150 toperform an automation function, such as MMI (Man Machine Interface),SCADA (Supervisory Control and Data Acquisition), portable ordistributed data acquisition, process control, advanced analysis, orother control. In one embodiment, the computer 102 may be either of thecomputers 82 or 86 shown in FIG. 1, which as described above areoperable to programmatically generate graphical programs based onreceived information. Also, in one embodiment, the computer 102 mayexecute a generated graphical program, such as a graphical program thatis involved with the automation function performed by the automationsystem 160.

The one or more devices may include a data acquisition board 114 andassociated signal conditioning circuitry 124, a PXI instrument 118, avideo device 132 and associated image acquisition card 134, a motioncontrol device 136 and associated motion control interface card 138, afieldbus device 170 and associated fieldbus interface card 172, a PLC(Programmable Logic Controller) 176, a serial instrument 182 andassociated serial interface card 184, or a distributed data acquisitionsystem, such as the Fieldpoint system available from NationalInstruments, among other types of devices.

The DAQ card 114, the PXI chassis 118, the video device 132, and theimage acquisition card 136 are preferably connected to the computer 102as described above. The serial instrument 182 is coupled to the computer102 through a serial interface card 184, or through a serial port, suchas an RS-232 port, USB, or IEEE 1394 or 1394.2 provided by the computer102. The PLC 176 couples to the computer 102 through a serial port,Ethernet port, or a proprietary interface. The fieldbus interface card172 is preferably comprised in the computer 102 and interfaces through afieldbus network to one or more fieldbus devices. Each of the DAQ card114, the serial card 184, the fieldbus card 172, the image acquisitioncard 134, and the motion control card 138 are typically plugged in to anI/O slot in the computer 102 as described above. However, these cards114, 184, 172, 134, and 138 are shown external to computer 102 forillustrative purposes. In typical industrial automation systems a devicewill not be present of each interface type, and in fact many systems mayonly have one or more devices of a single interface type, such as onlyPLCs. The devices are coupled to the device or process 150.

Referring again to FIGS. 2A and 2B, the computer system(s) 102preferably includes a memory medium(s) on which one or more computerprograms or software components according to one embodiment of thepresent invention are stored. For example, the memory medium may store aGPG program which is executable to receive program information andprogrammatically generate a graphical program based on the information.The same or a different memory medium may also store a server programwith which a client portion of the GPG program interfaces in order togenerate the graphical program. The memory medium may also store aprogrammatically generated graphical program. The memory medium may alsostore a graphical programming development environment applicationoperable execute or edit the programmatically generated graphicalprogram. It is noted that various of these software programs may bestored on different computer systems, as described above with referenceto FIG. 1. Also, in various embodiments, various of the above softwareprograms may be implemented or combined in different ways. For example,a graphical programming development environment application mayimplement the server program with which a client program interfaces toprogrammatically generate a graphical program.

The term “memory medium” is intended to include an installation medium,e.g., a CD-ROM, floppy disks 104, or tape device, a computer systemmemory or random access memory such as DRAM, SRAM, EDO RAM, Rambus RAM,etc., or a non-volatile memory such as a magnetic media, e.g., a harddrive, or optical storage. The memory medium may comprise other types ofmemory as well, or combinations thereof.

In addition, the memory medium may be located in a first computer inwhich the programs are executed, or may be located in a second differentcomputer which connects to the first computer over a network, such asthe Internet. In the latter instance, the second computer may providethe program instructions to the first computer for execution. Also, thecomputer system 102 may take various forms, including a personalcomputer system, mainframe computer system, workstation, networkappliance, Internet appliance, personal digital assistant (PDA),television system or other device. In general, the term “computersystem” can be broadly defined to encompass any device having at leastone processor which executes instructions from a memory medium.

In one embodiment, the GPG program and/or the resulting graphicalprogram that is programmatically generated may be designed for dataacquisition/generation, analysis, and/or display, and for controlling ormodeling instrumentation or industrial automation hardware. For example,in one embodiment, the National Instruments LabVIEW graphicalprogramming development environment application, which providesspecialized support for developers of instrumentation applications, mayact as the server program. In this embodiment, the client program may bea software program that receives and processes program information andinvokes functionality of the LabVIEW graphical programming developmentenvironment. The client program may also be a program involved withinstrumentation or data acquisition.

However, it is noted that the present invention can be used for aplethora of applications and is not limited to instrumentation orindustrial automation applications. In other words, FIGS. 2A and 2B areexemplary only, and graphical programs for any of various types ofpurposes may be generated by a GPG program designed for any of varioustypes of purposes, wherein the programs are stored in and execute on anyof various types of systems. Various examples of GPG programs andgenerated graphical programs are discussed below.

FIG. 3—Computer System Block Diagram

FIG. 3 is a block diagram of the computer system illustrated in FIGS. 1,2A and 2B. It is noted that any type of computer system configuration orarchitecture can be used as desired, and FIG. 3 illustrates arepresentative PC embodiment. It is also noted that the computer systemmay be a general purpose computer system as shown in FIGS. 2A and 2B, acomputer implemented on a VXI card installed in a VXI chassis, acomputer implemented on a PXI card installed in a PXI chassis, or othertypes of embodiments. The elements of a computer not necessary tounderstand the present invention have been omitted for simplicity.

The computer 102 includes at least one central processing unit or CPU160 which is coupled to a processor or host bus 162. The CPU 160 may beany of various types, including an x86 processor, e.g., a Pentium class,a PowerPC processor, a CPU from the SPARC family of RISC processors, aswell as others. Main memory 166 is coupled to the host bus 162 by meansof memory controller 164.

The main memory 166 may store computer programs according to oneembodiment of the present invention, such as described above withreference to FIGS. 2A and 2B. The main memory 166 may also storeoperating system software as well as other software for operation of thecomputer system, as well known to those skilled in the art. Computerprograms stored in the main memory 166 may implement one or more of themethods described below.

The host bus 162 is coupled to an expansion or input/output bus 170 bymeans of a bus controller 168 or bus bridge logic. The expansion bus 170is preferably the PCI (Peripheral Component Interconnect) expansion bus,although other bus types can be used. The expansion bus 170 includesslots for various devices such as the data acquisition board 114 (ofFIG. 2A) and a GPIB interface card 122 which provides a GPIB businterface to the GPIB instrument 112 (of FIG. 2A). The computer 102further comprises a video display subsystem 180 and hard drive 182coupled to the expansion bus 170.

As shown, a reconfigurable instrument 190 may also be connected to thecomputer 102. The reconfigurable instrument 190 may include configurablelogic, such as a programmable logic device (PLD), e.g., an FPGA, or aprocessor and memory, which may execute a real time operating system.According to one embodiment of the invention, a programmaticallygenerated graphical program may be downloaded and executed on thereconfigurable instrument 190. For example, a graphical programmingdevelopment environment with which the graphical program is associatedmay provide support for downloading a graphical program for execution onconfigurable logic in a real time system. In various embodiments, theconfigurable logic may be comprised on an instrument or device connectedto the computer through means other than an expansion slot, e.g., theinstrument or device may be connected via an IEEE 1394 bus, USB, orother type of port. Also, the configurable logic may be comprised on adevice such as the data acquisition board 114 or another device shown inFIG. 2A.

FIG. 4—Programmatic Creation of a Graphical Program

In prior systems, a user interactively or manually creates or edits agraphical program. For example, the user may interactively add variousobjects or icons to a graphical program block diagram, connect theobjects together, etc. In contrast, one embodiment of the presentinvention comprises a system and method for programmatically generatinga graphical program (or portion of a graphical program) withoutrequiring this type of user interaction.

FIG. 4 is a flowchart diagram illustrating one embodiment of a methodfor programmatically generating a graphical program. In step 200, agraphical program generation (GPG) program may be created, wherein theGPG program is operable to programmatically generate a plurality ofgraphical programs, based on received information. As described below,the GPG program may be associated with any of various purposes orapplications. Also, as discussed above, the GPG program may beimplemented in various ways, e.g., using graphical and/or text-basedprogramming environments. For example, the GPG program may be atext-based program, such as a program written using C, C++, Java, Basic,Visual Basic, FORTRAN, Pascal, or another text-based programminglanguage. Also, the GPG program may itself be a graphical program. Forexample, the GPG program may be a graphical program interactivelycreated in response to user input.

As described below, the GPG program may be implemented based on aclient/server programming model. The client portion may call anapplication programming interface (API) provided by the server portionusable for programmatically creating the new graphical program. Forexample, a text-based GPG program may include text-based code forcalling various API functions or methods, while a graphical GPG programmay include various graphical nodes which are operable to invokefunctions of the API. The creation of the GPG program may be performedby a developer, wherein the GPG program may then be used as a tool forthe programmatic creation of graphical programs by users or otherdevelopers.

As shown in step 204, program information for the new graphical program(or graphical program portion) to be generated may be specified, e.g.,in response to user input. As described below, this program informationmay comprise any of various types of information and may specifyfunctionality of the new graphical program.

In step 206, the GPG program may be executed. The GPG program may beexecuted in any type of computer system.

In step 208, the GPG program may receive the program informationspecifying the functionality for the graphical program or graphicalprogram portion. As described below, the GPG program may receive anytype of information from any type of source.

In step 210, the GPG program may programmatically generate a graphicalprogram or graphical program portion to implement the functionalityspecified by the received information. In other words, in response toreceiving the information in step 208, the GPG program mayprogrammatically generate a new graphical program or program portionbased on the information. The graphical program may be programmaticallygenerated with little or no user input received during this creating. Inone embodiment, the graphical program is programmatically generated withno user input required. In another embodiment, the user may be promptedfor certain decisions during programmatic generation, such as the typeof graphical program, the look and feel of a user interface for thegraphical program, the number or degree of comments contained within thegraphical program, etc.

In response to receiving the information in step 208, the GPG programmay process the information in order to determine how to generate thegraphical program, i.e., in order to determine appropriate graphicalsource code for the program, an appropriate user interface for theprogram, etc. As described below, the determination of how to generatethe graphical program may depend on a combination of the receivedinformation and/or the program logic of the GPG program (i.e., what theGPG program is operable to do with the received information).

In generating the determined graphical program, the GPG program mayspecify the inclusion of various objects in the new graphical program.For example, the new graphical program may have a diagram portionincluding a plurality of interconnected nodes which visually indicatefunctionality of the new graphical program. The new graphical programmay also have a user interface portion including various user interfaceobjects, such as one or more user interface panels having controls forspecifying user input to the graphical program and/or indicators fordisplaying output from the graphical program. The GPG program may alsospecify other aspects of the graphical program, such as:interconnections between diagram objects, connections between diagramobjects and user interface objects, positions of objects, sizes ofobjects, input/output terminals or terminal names for diagram objects,comments for diagram objects, and properties or configuration of objects(e.g., configuration of data types, parameters, etc.), among otheraspects of the graphical program.

In various embodiments, the GPG program may generate a graphical programof any of various types. For example, the GPG program may generate thegraphical program specifically so that a particular graphicalprogramming development environment is operable to edit and/or executethe graphical program.

In one embodiment, the GPG program may be a self-contained program thatincludes all executable logic necessary for programmatically generatingthe new graphical program. However, in the preferred embodiment, the GPGprogram utilizes a client/server programming model, in which the clientportion processes the program information and determines the graphicalprogram to be generated based on the program information (i.e.,determines the function nodes or other objects to be included in theprogram, the interconnections among these nodes/objects, etc.). Theclient portion may then call an API provided by the server portion torequest the server portion to perform the actual creation of the newgraphical program, e.g., by creating files and/or other data structuresrepresenting the new graphical program. The server portion may executeon the same computer system as the client portion or may execute on adifferent computer system, e.g., a different computer system connectedby a network. In one embodiment, the server portion may be an instanceof a graphical programming development environment application, whichprovides an API enabling client programs to programmatically createand/or edit graphical programs.

The method of FIG. 4 is illustrated and is described above in terms ofgenerating a new graphical program. It is noted that a similar methodmay be used to modify an existing graphical program, e.g., in order toadd functionality to the program, such as functionality specified byuser input received by a user interface wizard. In other words, insteadof specifying creation of a new graphical program, the GPG program mayspecify the modification of an existing graphical program. Whenexecuted, the GPG program is then operable to programmatically modifythe existing graphical program. For example, the GPG program may includea reference to the existing graphical program and may perform variousAPI calls to modify the graphical program, e.g., by adding one or moreobjects to the graphical program, changing connections between graphicalprogram objects, changing various properties of graphical programobjects, etc.

It is noted that FIG. 4 represents one embodiment of a method forprogrammatically generating a graphical program, and various steps maybe added, reordered, combined, omitted, modified, etc. For example, asdescribed above, the GPG program may include or may be associated withan application that the user uses to specify the program information.For example, such an application may enable the user to specify a statediagram, a test executive sequence, a prototype, etc., on which to basethe graphical program. Thus, executing the GPG program in step 206 maycomprise invoking a routine or program associated with this application,e.g., in response to the user selecting a menu option included in theapplication's user interface. In other embodiments, the user may launchthe GPG program as an independent application.

FIG. 5—Examples of GPG Programs and Received Information

FIG. 5 is a block diagram illustrating that the GPG program may be aprogram for any of various purposes and may receive information of anytype to use in generating a graphical program. FIG. 5 illustrates a GPGprogram 250 and various types of program information 252 that the GPGprogram may receive.

In some embodiments, the GPG program 250 may include or be coupled witha program or application which a user utilizes to construct orcharacterize a computational process. In response to the specifiedcomputational process, the GPG program 250 may programmatically generatea graphical program to implement the computational process.

For example, a state diagram editor may be used to construct a statediagram characterizing a computational process, e.g., in response touser input. As shown in FIG. 5, the GPG program 250 may then receivestate diagram information 252A and use this state diagram information toprogrammatically generate the graphical program. For example, theprogrammatically generated graphical program may implement functionalityspecified by the state diagram created by the user.

As another example, the GPG program 250 may include or be coupled with aprogram or application which a user utilizes to construct a prototype,e.g., in order to characterize an algorithm at a high level. Theconstructed prototype may be represented as prototype information 252B.In this case, the GPG program 250 may then programmatically generate agraphical program that implements the prototype, based on the prototypeinformation 252B. For more information on programmatically generating agraphical program to implement a prototype, please see U.S. patentapplication Ser. No. 09/595,003, incorporated by reference above.

As another example, the GPG program 250 may include or be coupled with aprogram or application which a user utilizes to construct a testexecutive sequence, e.g., to perform a series of tests on a unit undertest. In this case, the GPG program 250 may then programmaticallygenerate a graphical program operable to perform the series of testswhen executed, based on test executive sequence information 252C.

In other embodiments, the GPG program 250 may be associated with aprogram or application that directly aids the user in creating agraphical program. For example, the GPG program 250 may be associatedwith a graphical programming development environment application. Inthis case, the GPG program 250 may be operable to receive user inputspecifying desired functionality, indicated as user interface wizardinformation 252D in FIG. 5, and may automatically, i.e.,programmatically, add a portion of graphical source code to the user'sgraphical program implementing the specified functionality. For example,the user interface wizard information 252D may be received via one ormore “wizard” graphical user interface (GUI) panels or dialogs enablingthe user to specify various options. Such graphical program codegeneration wizards may greatly simplify the user's task of implementingvarious operations. As an example, it is often difficult for developersof instrumentation applications to properly implement code to analyze anacquired signal, due to the inherent complexity involved. By enablingthe developer to specify the desired functionality through a high-leveluser interface, the developer can quickly and easily request appropriategraphical source code for implementing the signal analysis to beautomatically included in the graphical program. Furthermore, since thegraphical source code is generated programmatically, the code may beoptimized, resulting in an efficient program and a readable blockdiagram without unnecessary code.

In other embodiments, the GPG program 250 may be operable toautomatically translate an existing program into a graphical program.The GPG program may examine the existing program and programmaticallygenerate a graphical program. In one embodiment, the GPG program mayinclude or interface with different front-end plug-in modules, whereineach plug-in module is operable to analyze a particular type of program,e.g., a program written in a particular language or used by a particulardevelopment environment, and generate existing program information 252Eusable by the GPG program for creating a graphical program thatimplements functionality of the existing program. The programmaticallygenerated graphical program may perform the same, or substantially thesame functionally as, or a subset of the functionality of the existingprogram.

In one embodiment, the existing program may be a text-based program,such as a C program. In another embodiment, the existing program mayitself be a graphical program. For example, although graphical programscreated using different graphical programming development environmentsare similar in some respects, the graphical programs typically cannot beeasily transferred across different graphical programming environmentsfor editing or execution. For example, different graphical programmingdevelopment environments provide different nodes for inclusion in ablock diagram, store program files in different formats, etc. Thus, ifan existing graphical program associated with one programmingenvironment is desired to be ported to a new programming environment,the GPG program may examine the existing graphical program (or mayexamine abstract information specifying the existing graphical program)and may programmatically generate a new graphical program associatedwith the new programming environment.

In another embodiment, the GPG program 250 may be operable toautomatically generate a graphical program in response to algorithminformation 252F.

In addition to the examples given above, a GPG program 250 may receiveany other type of information and programmatically generate a graphicalprogram based on the received information.

It is noted that, in various embodiments, the GPG program 250 mayreceive the information 252 used in generating the graphical program inany of various ways. The information may be received from the user, fromanother program, or from other sources, such as a file or database. Theinformation may comprise information of any type, including text orbinary information structured in any of various ways. The informationmay be self-describing, and/or the GPG program may include knowledge ofhow to interpret the information in order to generate the appropriategraphical program.

As an example, consider a state diagram editor application usable forconstructing a state diagram. In this example, the GPG program may be ormay be included in the state diagram editor application itself. Forexample, the state diagram editor application may receive user inputspecifying state diagram information. The state diagram editorapplication may then programmatically generate a graphical program toimplement functionality specified by the state diagram information,e.g., in response to the user selecting a menu option to generate thegraphical program. In other embodiments, the GPG program may be separatefrom the state diagram editor application. For example, when the userselects the menu option to generate the graphical program, the statediagram editor application may provide the state diagram information toanother application, i.e., the GPG program, which then generates thegraphical program based on this information. In another embodiment, auser may invoke the GPG program separately and request the GPG programto generate a graphical program, e.g., by specifying a state diagramfile. The GPG program may receive the state diagram information in anyof various ways formats, e.g., as binary data, XML data, etc.

In most of the examples given above, functionality of the graphicalprogram to be generated is specified explicitly by the receivedinformation. For example, a state diagram, user input specified via awizard interface, a prototype, a test executive sequence, and anexisting program, all explicitly specify, to varying degrees,functionality which the graphical program should implement.

It is noted that in other embodiments the received information by itselfmay not explicitly or inherently specify functionality of the graphicalprogram to be generated. In a case such as this, the functionality ofthe generated graphical program may be determined mainly by the GPGprogram. Thus, one embodiment may include different “types” of GPGprograms, wherein each type of GPG program is configured to generategraphical programs of a certain type. For example, consider twodifferent GPG programs, program A and program B, which are both operableto receive numeric data from a database and create a graphical programbased on the numeric data. Program A may be operable to create agraphical program which, when executed, performs one type of operationon the numeric data, and program B may be operable to create a graphicalprogram which, when executed, performs a different type of operation onthe numeric data. Thus, in these examples, the functionality of thegraphical program is determined mainly by the GPG program that generatesthe graphical program.

Thus, in various embodiments, the functionality of the graphical programmay be determined by the received program information, and/or the GPGprogram. In some cases the functionality may be specified almostentirely by the received information. For example, in a case where theGPG program programmatically translates an existing program to a newgraphical program, the functionality of the new graphical program may bespecified entirely by the existing program. In other cases, the receivedinformation and the GPG program may each determine a portion of thefunctionality. For example, in a case where the GPG program generates agraphical program to implement a test executive sequence, the testexecutive sequence information may determine the body of the programwhich includes the code for executing the tests, but the GPG program maybe operable to add additional functionality to the graphical program,e.g., by adding code operable to prompt the user for a log file and savetest results to the log file, code to display a user interfaceindicating the current unit under test and the current test beingperformed, etc.

In a typical case, the implementation of the source code for thegraphical program is determined mainly or entirely by the GPG program,although the received information may influence the manner in which theGPG program generates the code, or the GPG program may receive separateinformation influencing the code generation. For example, consider a GPGprogram operable to translate an existing graphical program to a newgraphical program, e.g., in order to port the existing graphical programto a new programming environment. In one embodiment, the GPG program maybe operable to generate the new graphical program in such a way as tomatch the existing graphical program as closely as possible inappearance. In other words, the new graphical program may be generatedso that when the user sees the block diagram of the new graphicalprogram, the block diagram appears substantially the same as the blockdiagram of the existing graphical program, e.g., in terms of the numberof block diagram nodes, the layout and interconnections among the blockdiagram nodes, etc. In another embodiment, the GPG program may beoperable to implement the source code for the new graphical programdifferently, e.g., by optimizing the code where possible. In thisexample, the functionality of the generated graphical program may be thesame in either case, but the graphical program may be implemented indifferent ways.

The GPG program may also receive input specifying how to implement thegraphical program. For example, in the case above, the user may specifywhether or not to perform optimizations when translating an existinggraphical program. For example, the new programming environment maysupport downloading the generated graphical program to a hardware devicefor execution. If the user desires to download the generated graphicalprogram to a hardware device, e.g., for use in a real-time application,then it may be important to optimize the new program. Otherwise, it maybe more important to implement the generated graphical program similarlyas the existing graphical program is implemented.

In one embodiment, the GPG program may provide extended support forspecifying graphical program code implementation, beyond the ability tospecify simple options. For example, the GPG program may supportplug-ins specifying code generation information for various cases.Referring again to the program translation example above, each plug-inmay specify how to generate code intended for execution on a particularhardware device. For example, if the generated program is to be run onan FPGA, the generation of the code may be optimized depending on thenumber of gates available on that particular FPGA.

In various embodiments, an association between a generated graphicalprogram and the received program information used in generating thegraphical program may be maintained. For example, after the graphicalprogram has been generated, this association may enable a user to recallthe program information or return to an application from which theprogram information originates, e.g., in order to view or edit theprogram information. For example, consider a prototyping environmentapplication which enables a user to develop a prototype characterizingan algorithm. The prototyping environment application mayprogrammatically generate a graphical program implementing the developedprototype. The user may then execute the graphical program, and if aproblem with the program is discovered, the association may enable theuser to return to the prototyping environment application in order toview or modify the prototype used to generate the program. The graphicalprogram may then be programmatically modified or re-generatedaccordingly.

In one embodiment, a generated graphical program may be “locked”,requiring the user to explicitly unlock the program before the programcan be modified within the graphical programming environment. Lockingthe graphical program may facilitate the retrieval or recreation of theprogram information that was used to generate the graphical program.

In various embodiments, the GPG program may be operable to generate anyof various types of graphical programs. For example, as discussed above,a generated graphical program may be targeted toward a particulargraphical programming development environment application, e.g., toutilize proprietary features or to create files that are formatted in amanner expected by the graphical programming development environment.Examples of graphical programming development environments includeLabVIEW, BridgeVIEW, DasyLab, and DiaDem from National Instruments, VEEfrom Hewlett Packard, Simulink from The MathWorks, Softwire fromMeasurement Computing, Inc., Sanscript from Northwoods Software, WiTfrom Coreco, and Vision Program Manager from PPT Vision, among others.

In various embodiments, the graphical program may be generated using anyof various methods or techniques. Generating the graphical program maycomprise generating one or more files defining the graphical program.When a user interactively develops a graphical program from within agraphical programming environment, the graphical programming environmentmay create one or more program files. For example, the program files mayspecify information such as a set of nodes that the graphical programuses, interconnections among these nodes, programmatic structures suchas loops, etc. In other cases, the program files may store various datastructures, e.g., in binary form, which the graphical programmingenvironment uses to directly represent the graphical program. Thus, inprogrammatically generating the graphical program, the GPG program mayprogrammatically generate one or more files representing the graphicalprogram, wherein these files are structured or formatted appropriatelyfor a particular graphical programming environment.

In various cases, a graphical program generated by a GPG program inresponse to program information may be a fully working program. Thus,the user may load the generated graphical program into the graphicalprogramming environment, execute the program, etc. In other cases, thegenerated graphical program may not be a complete program. As anexample, if an existing program is translated to a graphical program, itmay not be possible to translate the entire program. For example, theexisting program may utilize functions which do not exist in thegraphical programming environment to which the program is to be ported.However, the GPG program may still create a partial graphical program,making it relatively easy for the user to complete the graphicalprogram. In still other cases, it may be desirable to programmaticallygenerate only a graphical code portion, e.g., as discussed above in thecase of user interface wizard tools that aid the user in programdevelopment.

FIG. 6—Programmatically Generating a Graphical Program Portion inResponse to User Input

As discussed above, in one embodiment, a graphical program or portion ofa graphical program may be programmatically generated in response toprogram information received as user input. FIG. 6 is a flowchartdiagram illustrating one embodiment of a method for programmaticallygenerating a graphical program in response to user input received via agraphical user interface (GUI). The GUI may be any type of GUI, and theuser input may be received via the GUI in any of various ways. In oneembodiment, the GUI may comprise one or more GUI input panels. The GUIinput panels may take any of various forms, including a dialog box orwindow, and may include any of various means for receiving user input,such as menus, GUI input controls such as text boxes, check boxes, listcontrols, etc. The GUI input panels may comprise textual and/orgraphical information and may be able to receive textual and/orgraphical user input.

In step 300, the GUI may be displayed, e.g., one or more graphical userinterface (GUI) input panels may be displayed, wherein the GUI inputpanels comprise information useable in guiding a user in creation of aprogram. For example, a GPG program may include various code generation“wizards”, i.e., tools that enable a user to specify desired programfunctionality at a high level via GUI input panels. The GUI input panelsmay be displayed in response to user input indicating a desire tospecify program functionality. For example, the GPG program may providevarious menu options for invoking the GUI input panels. As anotherexample, the user may first display a node in a graphical program andmay then request to configure functionality for the node, and GUI inputpanels for configuring functionality of the node may be displayed inresponse to this request. Exemplary GUI input panels are describedbelow.

In step 302, user input may be received via the one or more GUI inputpanels, wherein the user input specifies desired program functionality.For example, as described above, the GUI input panels may comprisevarious GUI input controls such as text boxes, check boxes, listcontrols, etc., and the user may configure these GUI input controls toindicate the desired program functionality. As an example, consider acase where the GUI input panels enable the user to specify programfunctionality for generating waveform data. In this example, the GUIinput panel may include a list GUI control for choosing whether togenerate the data as a sine wave, square wave, etc., a numeric GUIcontrol for specifying the desired amplitude for the wave, a numeric GUIcontrol for specifying the desired frequency for the wave, etc. Thus, inthis example, the user input received may specify the desired waveformtype, the desired amplitude and frequency, etc.

In step 304, a graphical program (or graphical program portion) toimplement the specified desired functionality may be programmaticallygenerated in response to the received user input. Step 304 may compriseprogrammatically including graphical source code in the graphicalprogram. For example, the programmatically generated graphical sourcecode may comprise a plurality of nodes that are interconnected in one ormore of a data flow, control flow, and/or execution flow format, so asto implement the specified functionality. The nodes may haveinput/output terminals, terminal names, comments, or other aspects thatare programmatically generated. Thus, the GPG program may be operable togenerate various graphical programs (or portions), depending on thereceived user input. For example, in the waveform generation examplediscussed above, the GPG program may include a “sine wave” node in thegraphical program if the user specifies to generate sine wave data instep 302 or may include a “square wave” node in the graphical program ifthe user specifies to generate square wave data.

It is noted that in steps 300 and 302, a plurality of GUI input panelsmay be displayed, and user input may be received from each of thesepanels. For example, a first panel may be displayed on the display,wherein the first panel includes one or more first fields adapted toreceive first user input specifying first functionality of the graphicalprogram. User input specifying first functionality of the graphicalprogram may be received via the first panel. A second panel may then bedisplayed for receiving second user input specifying secondfunctionality of the graphical program. In one embodiment, the secondpanel that is displayed may be based on the first user input. In otherwords, in one embodiment the GUI input panels may be displayed in awizard-based manner that guides the user in specifying the desiredfunctionality.

FIG. 7—Programmatically Generating Graphical Source Code for a Node

FIG. 7 is a flowchart diagram illustrating one embodiment of a methodfor programmatically generating graphical source code associated with aparticular node. The flowchart of FIG. 7 illustrates one embodiment ofthe method of FIG. 6, in which a graphical program portion isprogrammatically generated in response to user input.

In step 310, a node may be displayed in a graphical program, wherein thenode initially has no functionality or has default functionality. Asdescribed below, the node may be able to take on different functionalityin the graphical program, depending on configuration user inputreceived. The node may be generally related to a particular functionalrealm, such as data acquisition, signal analysis, data display, networkcommunications, etc. However, until configuration user input is receivedfor the node, as described below, the exact behavior of the node withinthe graphical program may be undefined.

In step 312, user input requesting to specify desired functionality orconfiguration information for the node may be received. For example, theuser may double click on the node, execute a menu option for configuringthe node, or perform this request in any of various other ways.

In step 314, one or more GUI input panels associated with the node maybe displayed in response to the user request received in step 312,wherein the GUI input panels comprise information useable in guiding theuser to specify functionality for the node. In step 316, user inputspecifying desired functionality for the node may be received via theone or more GUI input panels. In other words, the node may be configuredto perform a variety of functions within the program, depending on thisreceived user input. As noted above, the node may be generally relatedto a particular functional realm, such as data acquisition, signalanalysis, data display, etc. Thus, the GUI input panels displayed maycomprise information related to the particular functional realm. Forexample, for a node related to network communications, the GUI inputpanel may comprise GUI controls for configuring the node to specify adata source or target to which to connect, specify a connectionprotocol, etc.

In step 318, graphical source code may be programmatically generatedbased on the desired functionality specified in step 316. This graphicalsource code may be associated with the node in the graphical program,such that the node is operable to implement the desired functionalityspecified in step 316 when the graphical program is executed. Theprogrammatically generated graphical source code may comprise graphicalsource code similar to that which a user could create manually in agraphical programming development environment, e.g., by includingvarious function nodes or other types of nodes in the graphical programand connecting the nodes in one or more of a data flow, control flow,and/or execution flow format.

The programmatically generated graphical source code may be associatedwith the node in various ways. In one embodiment, the graphical sourcecode programmatically generated for the node may replace the node in thegraphical program so that the node is no longer visible in the graphicalprogram. However, in the preferred embodiment, the graphical program maystill appear the same, even after the graphical source code has beenprogrammatically generated in association with the node. That is, inresponse to the user input specifying desired functionality for thenode, the graphical source code implementing the specified functionalitymay be generated “behind” the node in a hierarchical fashion, such thatthe node still appears in the graphical program. In this instance, thegraphical source code may be programmatically created as a sub-program(or “sub-VI”) of the graphical program, wherein the node represents thesub-program. Generating the portion of graphical source code behind thenode in this way may help to keep the graphical program more readable.

The user may choose to view the graphical source code programmaticallygenerated behind the node if desired. For example, in response to usinga menu option or double-clicking on the node to view the source codegenerated behind the node, the programmatically generated graphicalsource code may be displayed. This may enable the user to modify theprogrammatically generated source code if desired. However, in oneembodiment, the user may be prevented from viewing and/or editing theprogrammatically generated graphical source code. For example, for aLite or Express version of a graphical programming developmentenvironment product, it may be desirable to prevent users from viewingthe programmatically generated graphical source code. This may force theuser to control the functionality of the node through the GUI inputpanel(s) for the node rather than directly modifying the graphicalsource code. For example, this may help to prevent novice users frombecoming confused by seeing more complex graphical source code.

As noted above, in one embodiment, when the node is initially displayedin the program, the node may have no functionality. That is, the nodemay not initially be operable to perform any function when the graphicalprogram is executed. A traditional function node available for inclusionin a graphical program typically has associated program instructionsthat are executed when the node is executed in the program. In thiscase, however, the node displayed in step 310 may not initially havesuch associated program instructions. Instead, the programmaticallygenerated graphical source code that is associated with the node in step318 may define the program instructions to be executed for the node. Forexample, these program instructions may be created from theprogrammatically generated graphical source code when the graphicalprogram is compiled or interpreted, and these program instructions maybe executed when the node is executed in the program.

Also as noted above, in one embodiment, when the node is initiallydisplayed in the program, the node may have default functionality. Thatis, the node may initially be operable to perform a default functionwhen the graphical program is executed. Thus, the node may haveassociated program instructions to be executed when the node is executedin the program, or there may be default graphical source code associatedwith the node when the node is initially included in the graphicalprogram. In this case, the programmatically generated graphical sourcecode that is associated with the node in step 318 may replace thedefault functionality for the node.

As described above, a node may be configured to perform a plurality ofoperations, depending on user input specifying configuration informationfor the node. The configuration information may be received via one ormore GUI input panels and may specify one or more desired operations forthe node from the plurality of possible operations. However, since thegraphical source code associated with the node is generatedprogrammatically, a “minimal” amount of graphical source code may begenerated, i.e., only graphical source code necessary to implement theone or more desired operations may be generated. Thus, source codecorresponding to operations from the plurality of operations that arenot among the one or more desired operations may not be included in thegraphical program.

Associating a minimal amount of source code with a graphical programnode operable to perform a plurality of operations may have severaladvantages. For example, by only including graphical source code in theprogram that is actually used, the program may be significantly morereadable. Also, by not including unnecessary code the size of theprogram can be reduced, which may be important for systems with limitedamounts of memory. Also, if the program is to be implemented in ahardware device, e.g., in an FPGA device, then it may be especiallyimportant to reduce the program size so that the program may beimplemented with a limited amount of hardware resources available on thedevice.

FIGS. 8-14: Examples

As described above with reference to FIG. 7, in one embodiment, the usermay first display a node in a graphical program and may then utilize oneor more GUI input panels to configure program functionality for thenode. FIG. 8 illustrates an exemplary GUI input panel for configuring awaveform generator node. In response to the user specifying differentsettings for the GUI controls on the GUI input panel, differentgraphical source code portions may be programmatically generated for thewaveform generator node.

FIGS. 9-14 show a simple example illustrating this concept. FIG. 9illustrates a graphical program including a “Simple Math” node. FIG. 10illustrates a GUI input panel for configuring functionality of theSimple Math node. For example, a user may double-click on the SimpleMath node or may execute a menu option to display the GUI input panel ofFIG. 10. As shown, the user may choose to configure the Simple Math nodeto perform either an add or a multiply operation.

In response to the user input received via the GUI input panel of FIG.10, different portions of graphical source code may be programmaticallygenerated in the graphical program. If the user chooses the multiplyoperation, then the graphical source code of FIG. 11 may beprogrammatically generated; this portion of graphical source codeincludes a multiplication function node. If the user chooses the addoperation, then the graphical source code of FIG. 13 may beprogrammatically generated; this portion of graphical source codeincludes an addition function node. FIGS. 12 and 14 illustrate GUIpanels for the graphical program that indicate the execution results ofthe graphical source code of FIGS. 11 and 13, respectively.

The graphical source code of FIG. 11 illustrates a multiplication node,and the graphical source code of FIG. 13 illustrates an addition node.When the user first includes the Simple Math node in the graphicalprogram, the Simple Math node may not be associated with either one ofthe multiplication or addition node, or may be associated with a defaultone of these nodes. In response to the user operating the GUI inputpanel of FIG. 10, the GPG program (which in this example may be agraphical programming development environment application) mayprogrammatically generate either the multiplication or addition nodesuch that the programmatically generated node is associated with theSimple Math node and in effect replaces the Simple Math node duringprogram execution. However, as described above, the program may stillappear to the user as shown in FIG. 9, in which the Simple Math node isshown. That is, the multiplication or addition node may be generated“behind” the Simple Math node. The user may then request to view thegraphical source code generated behind the Simple Math node if desired.

FIGS. 9-14 show a very simple example of an operation of configuringprogram functionality for a node, and it is noted that more complex GUIinput panels may be used to create more complex graphical source codeportions.

FIG. 15—Programmatically Replacing Graphical Source Code for a Node

FIG. 15 is a flowchart diagram illustrating one embodiment of a methodfor programmatically replacing graphical source code associated with aparticular node. As described above with reference to FIG. 7, graphicalsource code defining functionality for a node may be programmaticallygenerated and associated with the node in response to user input. FIG.15 illustrates one embodiment of a method for changing the functionalityof the node.

In step 322, user input requesting to change functionality of the nodemay be received. For example, this input may be received similarly as instep 312 of FIG. 7, e.g., by the user double-clicking on the node,executing a menu option for configuring the node, etc.

In step 324, the one or more GUI input panels associated with the nodedisplayed in step 314 may be re-displayed in response to the userrequest received in step 322. As described above, the GUI input panel(s)may comprise information useable in guiding the user to specifyfunctionality for the node. In this case, the GUI input panels may beused to specify additional or changed functionality for the node.

In step 326, user input specifying new functionality for the node may bereceived via the one or more GUI input panels. For example, referringagain to the waveform generator node example discussed above, if thenode was originally configured to generate sine wave data, the GUI inputpanel(s) may be used to reconfigure the node to generate square wavedata.

In step 328, the graphical source code that was previously generated inassociation with the node may be replaced with new graphical source codethat implements the specified new functionality for the node or may bemodified to implement the specified new functionality.

It is noted that although the method of FIG. 15 is discussed in terms ofreplacing graphical source code generated in association with aparticular node, a similar method may be employed to replace a graphicalprogram portion generated in accordance with the more general case ofthe method of FIG. 6.

FIG. 16—Graphical Program Solution Library

In many scientific and engineering domains in which computer programsare utilized, problems may be classified into certain general groups.Thus, a particular computer program is often implemented as a specificvariation of a more generic program process. Each scientific orengineering domain may have its own paradigmatic program processes.

For example, within the test and measurement and industrial automationfields, program processes often involve receiving input from and/orsending output to hardware devices. One typical program process may bereferred to as “Acquire, Process, Display”. In other words, a programbased on this program process may acquire data from a device or UUT,process the data, and display the data. Another typical program processmay be referred to as “Output, Wait, Acquire, Process, Display”. Inother words, a program based on this program process may output data toa device (e.g., a control signal), wait for a specified period of time(e.g., while the device responds to the control signal), acquire datafrom the device (e.g., data generated in response to the controlsignal), process the acquired data, and display the data.

Providing a library of pre-defined program processes on which to base aprogram may help the user in conceptualizing the problem to be solvedand may help the user to implement the desired program more rapidly.However, for each particular program that is based on one of thesegeneral program processes, the program typically needs to be customizedto perform the desired task. For example, for a program based on the“Output, Wait, Acquire, Process, Display” program process describedabove, the step of outputting the data to the device may need to becustomized to specify the data to be outputted, the device to which tosend the data, etc. The other steps may need to be similarly customized.

FIG. 16 is a flowchart diagram illustrating one embodiment of a methodfor creating a graphical program based on a pre-defined program process.In step 400, information indicating a plurality of program processes maybe displayed. The program processes that are displayed may be related toa particular field or discipline and may be organized and displayed inany way desired.

FIGS. 17-19 illustrate exemplary GUI windows for displaying programprocesses such as those described above related to the test andmeasurement and industrial automation fields. As shown, the programprocesses are grouped by whether they are related to input, output, orboth. The windows include selectable tabs labeled “Input”, “Output”, and“Input/Output” to enable the user to choose which program processes todisplay. FIG. 17 illustrates a window with the “Input” tab selected, andFIGS. 18 and 19 illustrate windows with the “Input/Output” tab selected.

In each window, the available program processes are listed in a list boxon the left side of the window. Each program process has a correspondinggraphical program template, wherein each graphical program templatecomprises a plurality of interconnected nodes for implementing theprogram process. As the user selects a program process in the list boxon the left, the corresponding graphical program template is shown onthe right side of the window.

In step 402, user input selecting a desired program process from theplurality of available program processes may be received. For example,in the windows described above, the user may select the desired programprocess in the list box on the left and may then press the “UseTemplate” button.

In step 404, the graphical program template corresponding to theselected program process may be programmatically included in thegraphical program. In other words, the interconnected nodes of thetemplate are programmatically included in the graphical program.

The user may then customize the graphical program to perform the exactprocess desired. In one embodiment, one or more of the nodes included inthe template may be customized according to the method of FIG. 7. Inother words, the node(s) may initially have no definite functionality ormay have default functionality, and one or more GUI panels may bedisplayed to receive user input specifying desired functionality for thenode(s). Graphical source code to implement the specified functionalitymay then be programmatically generated and associated with the node(s)as described above, e.g., as sub-programs.

FIG. 20 illustrates an exemplary graphical program which wasprogrammatically created based on the “Acquire, Process, Display”program process described above. FIG. 21 illustrates a GUI input panelfor configuring the node labeled “Process the Data”, i.e., the node thatprocesses (in this case filters) the data after the data is acquiredfrom the device.

FIG. 22—Dynamically Specifying Input/Output Terminals of a Node

As graphical programming development environments have matured and grownmore complex, graphical source code has become more feature-packed, andin some cases this has made the graphical programs harder to understandat a glance. One area in which readability problems have occurred is inthe area of input/output terminals for graphical program nodes. An inputterminal for a node comprises a connection point where the node canreceive data from a data source in the graphical program (e.g., from anoutput terminal of another node). An output terminal for a nodecomprises a connection point where the node can provide data to a datatarget in the graphical program (e.g., to an input terminal of anothernode).

For some graphical program nodes, the number of input/output terminalshas become very large so that it can be confusing to the user. As aresult, the purpose of each of the various terminals is not alwaysapparent to the user. Also, it is often not clear to the user whatcombination of terminals needs to be connected to other elements in theprogram to accomplish the desired task. In many cases, not all of theinput/output terminals need to be used. For example, the functionalbehavior of some nodes can be controlled to a great degree depending onwhich of a subset of input/output terminals are connected to datasources/targets.

FIG. 22 is a flowchart diagram illustrating one embodiment of animproved method for connecting input/output terminals of a graphicalprogram node to data sources/targets in the graphical program.

In step 330, a node may be displayed in a graphical program, e.g., inresponse to user input requesting inclusion of the node in the graphicalprogram. For example, the user may select the node from a GUI palette ormenu. In one embodiment, when the node is initially displayed, noinput/output terminals may appear on the node, or a default set ofinput/output terminals may appear.

In step 332, one or more GUI input panels may be displayed in responseto user input requesting to provide configuration information for thenode. For example, the GUI input panel(s) may enable the user to specifydesired functionality for the node, similarly as described above. Instep 334, user input specifying functionality or other configurationinformation for the node may be received via the GUI input panel(s).

In step 336, input and/or output terminals for the node may beprogrammatically created and displayed on the node, based on theconfiguration information received in step 334. The one or moreinput/output terminals that are displayed on the node may be a subset ofthe possible input/output terminals, i.e., a subset that facilitatesconfiguration of the node to accomplish the desired functionalityspecified in step 334. For example, it may be determined that one ormore of the possible input/output terminals for the node are notrelevant, depending on the configuration information specified by theuser. In this case, the irrelevant terminal(s) may not be displayed onthe node; only the terminals needed for accomplishing the desiredfunctionality may be displayed.

In another embodiment, one or more input/output terminals that arerelevant may not be displayed, simply to make the graphical program morereadable. For example, the method may only display input/outputterminals that facilitate an understanding of the functionalityperformed by the node and may hide other terminals, such as terminalsfor propagating state or error information.

In step 338, the programmatically created input/output terminals for thenode may be connected to data sources/targets in the graphical programin response to user input. Since only relevant terminals may bedisplayed, the user may have a much better understanding of how toconnect the node to other elements of the program. The resultinggraphical program may be significantly more understandable.

It is noted that in some graphical programming development environments,input/output terminals for a node are not explicitly displayed at alltimes. For example, the terminals may not appear until the user movesthe mouse cursor over the node. In this instance, “displaying” theprogrammatically created input/output terminals in step 336 may involvecausing the terminals to appear when the user moves the mouse cursorover the node or performs another action causing the terminals toappear.

A drawback of the approach of not displaying input/output terminals atall times is that the input/output terminals for the node are notclearly labeled. For example, FIG. 23 illustrates a prior art graphicalprogram including various nodes with wires leading to input terminals ofthe nodes or leading from output terminals of the nodes. However, it isnot clear what the purposes of the input/output terminals are. Forexample, for a given wire connected to an input terminal of a node, itis difficult to tell at a glance what data that wire provides to theinput terminal.

In one embodiment of step 336, the programmatically created input/outputterminals for the node may be displayed in such a way as to solve thisproblem. The input/output terminals may be displayed as labels under thenode, as shown in the graphical programs of FIGS. 24 and 25. Theselabels clearly indicate the purpose of the input/output terminals. Toconnect an input/output terminal to a data source/target, theappropriate label may be wired to the data source/target, as shown inFIGS. 24 and 25. It is noted that in other embodiments the labels may beplaced in other locations besides underneath the nodes, as desired.

It is noted that this method of displaying input/output terminals fornodes in a graphical program as labels under the nodes may be usedregardless of whether the input/output terminals are programmaticallycreated based on node configuration information as described above. Forexample, some graphical programming development environments may notsupport the above-described method of programmatically creating anddisplaying a relevant subset of input/output terminals for a node, butmay always display all of the possible terminals for the node. In thisinstance, the terminals may still be displayed as labels under thenodes.

FIG. 26—Specifying an Alias for Input/Output Terminals of a Node

Another aspect related to understanding the function of a node pertainsto the actual names of the input/output terminals. In the prior art, theuser has not been able to change default terminal names. It would bedesirable to enable the user to change default terminal names to namesthat are more meaningful to the user or to the particular program. FIG.26 is a flowchart diagram illustrating one embodiment of a method forspecifying an alias for input/output terminals of a node.

In step 350, a node may be displayed in a graphical program, e.g., inresponse to user input requesting inclusion of the node in the graphicalprogram. For example, the user may select the node from a GUI palette ormenu. The node may initially have input and/or output terminals withdefault names.

In step 352, one or more GUI input panels may be displayed in responseto user input requesting to provide configuration information for thenode. For example, the GUI input panel(s) may enable the user to specifydesired functionality for the node, similarly as described above, or mayenable the user to provide any other type of configuration informationfor the node. In particular, the GUI input panel(s) may enable the userto specify an alias for one or more input and/or output terminals of thenode.

In step 354, user input specifying configuration information for thenode may be received via the GUI input panel(s), wherein the user inputincludes input specifying an alias for at least one input terminal oroutput terminal of the node. As an example, for a node that includes aninput terminal with a default name of “input signal”, the user maychoose to specify an alias of “voltage”, which may be a more meaningfulname for the input terminal of the node in the user's particular case.

In step 356, for each input terminal or output terminal for which analias was specified, the aliases may be displayed in the graphicalprogram. This may involve replacing default terminal names. In oneembodiment, the aliases may be displayed as labels under the nodes,similarly as shown in FIG. 25. The user may then connect the inputterminals and output terminals to data sources/targets in the graphicalprogram, as described above. The method of FIG. 26 may be combined withother methods described above. For example, with respect to the methodof FIG. 23, when input/output terminals for a node are programmaticallycreated, one or more of the terminals may be indicated by a specifiedalias.

Collector Node Example

One common task that often needs to be performed in a program is toperform various types of numerical functions on a collection of datavalues. For example, the program may implement a loop in which a datavalue is received in each iteration of the loop. The program may keeptrack of the data values that have been received and may numericallyanalyze the data values, e.g., to compute the average value, the sum ofthe values, the maximum value, or any other type of analysis ornumerical function.

While simple in concept, in the prior art, this type of behavior hasbeen difficult to implement in a graphical program, in part because itinvolves keeping track of previously received values. FIG. 27illustrates a node referred to herein as a “collector node”, whichsimplifies these types of common programming tasks. The collector nodeis preferably a primitive node provided by a graphical programmingdevelopment environment for inclusion in a graphical program. Thecollector node may be operable to maintain state information regardingreceived data values and may use the state information to determine adata collection on which to perform a numerical function. The datacollection comprises at least a subset of data values that have beenreceived by the collector node. As described below, the user may be ableto configure the collector mode to determine the data collection invarious ways. Exemplary graphical programs that use collector nodes arediscussed below. The collector node and these example graphical programsalso illustrate exemplary applications of various embodiments of themethods described above.

FIG. 28 illustrates an exemplary GUI input panel for configuring thecollector node shown in FIG. 27. The GUI input panel includes a fieldlabeled “Collection Mode”, which specifies which data values to analyze,referred to below as a data collection. In one embodiment, the possiblechoices for this field include, “Sliding Block”, “Fixed Block”, and“Always”. If “Sliding Block” or “Fixed Block” are chosen, then a numberof data values to track may be specified, as indicated by the “Size ofCollection” field.

If “Sliding Block” is chosen, then the data collection becomes validonce the specified number of data values has been received by thecollector node. These data values may then be analyzed. From that pointon, each time a new data value is received, the oldest data value isremoved from the data collection so that the number of data values underanalysis remains constant.

If “Fixed Block” is chosen, then the data collection becomes valid oncethe specified number of data values has been received by the collectornode. These data values may then be analyzed. When a new data value isthen received, the old data collection is discarded, and data valuecollection restarts until the specified number of data values has againbeen received.

If “Always” is chosen, then all data values are tracked, and theanalysis is performed on all of these data values, regardless of thenumber of data values received.

Referring now to FIG. 29, a collector node is shown which includesoutput terminals labeled as “Average”, “Sum”, and “Waveform Output”. The“Average” output terminal outputs the average value of the data valuescurrently being analyzed (e.g., according to the “Collection Mode” and“Size of Collection” criteria specified in the GUI input panel of FIG.28). The “Sum” output terminal outputs the sum of the data valuescurrently being analyzed. The “Waveform Output” output terminal outputsthe data values themselves as they are received.

In various embodiments, the collector node shown in FIG. 27 may beconfigured in any of various ways to result in the collector node shownin FIG. 29 with the displayed “Average”, “Sum”, and “Waveform Output”output terminals. In one embodiment, the user may click on the collectornode to view a list of available output terminals and may then selectthe ones desired to use in the program, and the selected outputterminals may be displayed in response. In another embodiment, thedesired terminals may be specified through a GUI input panel, asdescribed above with reference to the method of FIG. 23. For example,the GUI input panel of FIG. 28 may be extended to enable the user tospecify the outputs of interest.

It is noted that the output terminals shown in FIG. 29 are exemplaryonly, and in various embodiments, the collector node may implement anyof various types of numerical or statistical functions that can beperformed on a collection of data values, such as numerical average,sum, maximum value, minimum value, etc. In one embodiment, source codemay be programmatically generated in association with the collector nodesuch that only a minimal amount of code is included in the program,similarly as described above. For example, if the user chooses to use an“Average” output terminal but not a “Sum” output terminal, then duringexecution of the graphical program, the collector node may be operableto maintain a running average of the data values, but not a running sum.If, on the other hand, the user also chooses to use the “Sum” outputterminal, then code for maintaining a running sum of the data values mayalso be associated with the collector node.

Referring again to the GUI input panel of FIG. 28, there is also a fieldlabeled “Name of the Collection”. This field enables the user to specifyan alias for the output terminal that outputs the actual data values,i.e., the output terminal labeled, “Waveform Output” in FIG. 29. Thereis also a field labeled “Name of Collector Block” that enables the userto change the name of the collector node as it appears in the graphicalprogram, e.g., to a meaningful name for the particular program. There isalso a checkbox enabling the user to select an option titled,“Automatically take name of collector function”. If this checkbox ischecked, then the collector node's label in the block diagram will beautomatically set as a result of using the GUI input panel. For example,if the user selects the “Sliding Block” collection mode, then thecollector node's name would be automatically set to “Sliding Block”. Ifthe user unchecks this checkbox, then the user can specify another namefor the collector node's label.

There is also a checkbox labeled “Create Indicator”. If the user checksthis checkbox, a user interface indicator for displaying the data valuesreceived may be automatically created on a user interface panel for thegraphical program. A user interface node corresponding to this indicatormay be programmatically created in the block diagram of the graphicalprogram and may be wired to the collector node to receive the datavalues for display.

FIG. 30 illustrates an exemplary graphical program block diagram using acollector node. The graphical source code shown is enclosed in a loop.In each iteration of the loop, the node labeled “Random Number”generates a random data value that is passed to the “Input Signal” inputterminal of the collector node. As shown, the collector node has variousoutput terminals that are connected to user interface nodescorresponding to user interface indicators that appear on the userinterface panel for the graphical program (FIG. 31). The “WaveformOutput” output terminal is connected to a waveform graph user interfacenode that displays the randomly generated data values as a waveform. The“Average” output terminal is connected to a numeric user interface nodethat displays the average value of all the data values. The “Sum” outputterminal is connected to a numeric user interface node that displays thesum of all the data values.

FIG. 32 illustrates another exemplary graphical program block diagramusing two collector nodes. FIG. 33 illustrates the user interface panelfor the graphical program. One collector node is configured to keep arunning average of 100 data values, and the other is configured to keepa running average of 10 data values. (In this example, the values aregenerated as the user moves the “Slide” user interface control on theuser interface panel.) The block diagram of FIG. 32 is relatively easyto understand. FIG. 34 illustrates how the same program may beimplemented in the prior art. The block diagram of FIG. 34 issignificantly less readable than that of FIG. 32.

Implementation of Programmatic Generation

The above-discussed examples of programmatically generating a graphicalprogram or graphical program portion may be implemented in any ofvarious ways. For more information on one embodiment of a system andmethod for programmatically generating a graphical program, please referto the above-incorporated patent application titled, “System and Methodfor Programmatically Generating a Graphical Program in Response toProgram Information”.

Although the system and method of the present invention has beendescribed in connection with the preferred embodiment, it is notintended to be limited to the specific form set forth herein, but on thecontrary, it is intended to cover such alternatives, modifications, andequivalents, as can be reasonably included within the spirit and scopeof the invention as defined by the appended claims.

We claim:
 1. A computer-implemented method for programmaticallygenerating a graphical program, the method comprising: displaying agraphical user interface (GUI) on a display; receiving user input to theGUI specifying desired functionality of the graphical program; andautomatically generating the graphical program in response to the userinput specifying the functionality of the graphical program, wherein thegraphical program implements the specified functionality; wherein thegraphical program comprises a block diagram portion comprising aplurality of interconnected nodes, wherein the plurality ofinterconnected nodes visually indicate functionality of the graphicalprogram; wherein said automatically generating the graphical programincludes generating the block diagram portion without direct user inputspecifying the plurality of nodes or connections between the nodes; andwherein said automatically generating the graphical program furtherincludes automatically creating one or more user interface objects inthe graphical program, wherein the one or more user interface objectscomprise a graphical user interface that is displayed during executionof the graphical program, wherein said automatically generating thegraphical program includes generating the graphical user interfacewithout direct user input specifying the one or more user interfaceobjects, and wherein the one or more user interface objects perform oneor more of providing user input to or displaying output from thegraphical program during execution of the graphical program.
 2. Themethod of claim 1, wherein the GUI comprises information useable inguiding a user in creation of a program.
 3. The method of claim 1,wherein the GUI comprises one or more GUI input panels; wherein the userinput to the GUI comprises user input to each of the one or more GUIinput panels.
 4. The method of claim 3, wherein said displaying the GUIand said receiving user input to the GUI comprise: displaying a firstGUI input panel on the display, wherein the first GUI input panelincludes one or more first fields adapted to receive user inputspecifying first functionality of the graphical program; receiving firstuser input specifying first functionality of the graphical program;displaying a second GUI input panel on the display, wherein the secondGUI input panel includes one or more second fields adapted to receiveuser input specifying second functionality of the graphical program; andreceiving second user input specifying second functionality of thegraphical program.
 5. The method of claim 4, wherein the second GUIinput panel is one of a plurality of possible second GUI input panels,wherein the second GUI input panel is displayed based on the first userinput.
 6. The method of claim 1, wherein said automatically generatingthe graphical program comprises automatically generating a portion of agraphical program.
 7. The method of claim 1, wherein said automaticallygenerating the graphical program creates the graphical program withoutany user input specifying the new graphical program during saidcreating.
 8. The method of claim 1, wherein said automaticallygenerating the graphical program comprises: automatically creating aplurality of graphical program objects in the graphical program; andautomatically interconnecting the plurality of graphical program objectsin the graphical program; wherein the interconnected plurality ofgraphical program objects comprise at least a portion of the graphicalprogram.
 9. The method of claim 1, wherein the user input receivedspecifies an instrumentation function; and wherein the automaticallygenerated graphical program implements the specified instrumentationfunction.
 10. The method of claim 9, wherein the instrumentationfunction comprises one or more of: a test and measurement function; oran industrial automation function.
 11. The method of claim 1, whereinsaid automatically generating the graphical program comprises calling anapplication programming interface (API) enabling the programmaticgeneration of a graphical program.
 12. The method of claim 1, whereinsaid automatically generating the graphical program comprisesautomatically requesting a server program to generate the graphicalprogram.
 13. A computer-implemented method for automatically generatinga graphical program, the method comprising: displaying a plurality ofGUI input panels on a display, wherein the GUI input panels compriseinformation useable in guiding a user in creation of a program;receiving user input to the plurality of GUI input panels, wherein theuser input specifies desired functionality of the graphical program; andautomatically generating the graphical program in response to the userinput specifying the functionality of the graphical program, wherein thegraphical program implements the specified functionality; wherein thegraphical program comprises a block diagram portion comprising aplurality of interconnected nodes, wherein the plurality ofinterconnected nodes visually indicate functionality of the graphicalprogram; wherein said automatically generating the graphical programincludes generating the block diagram portion without direct user inputspecifying the plurality of nodes or connections between the nodes; andwherein said automatically generating the graphical program furtherincludes automatically creating one or more user interface objects inthe graphical program, wherein said automatically creating the one ormore user interface objects in the graphical program is performedwithout direct user input specifying the one or more user interfaceobjects, wherein the one or more user interface objects comprise agraphical user interface that is displayed during execution of thegraphical program, and wherein the one or more user interface objectsperform one or more of providing user input to or displaying output fromthe graphical program during execution of the graphical program.
 14. Acomputer-implemented method for automatically generating a graphicalprogram, the method comprising: displaying one or more input panels on adisplay; receiving user input to the one or more input panels;automatically generating graphical source code for the graphicalprogram, based on the received user input; and automatically creatingone or more user interface objects in the graphical program, whereinsaid automatically creating the one or more user interface objects inthe graphical program is performed without direct user input specifyingthe one or more user interface objects, wherein the one or more userinterface objects comprise a graphical user interface that is displayedduring execution of the graphical program, and wherein the one or moreuser interface objects perform one or more of providing user input to ordisplaying output from the graphical program during execution of thegraphical program; wherein the graphical program comprises a blockdiagram portion comprising a plurality of interconnected nodes, whereinthe plurality of interconnected nodes visually indicate functionality ofthe graphical program; and wherein said automatically generatinggraphical source code for the graphical program includes generatinggraphical source code for the block diagram portion without direct userinput specifying the plurality of nodes or connections between thenodes.
 15. The method of claim 14, wherein the one or more input panelscomprise a graphical user interface (GUI) useable in guiding a user inspecifying program functionality; wherein the received user inputspecifies desired functionality of the graphical program; wherein theautomatically generated graphical source code implements the specifieddesired functionality.
 16. A computer-implemented method forautomatically generating a graphical program, the method comprising:displaying a node in the graphical program in response to user input;displaying a graphical user interface (GUI) for configuringfunctionality for the node in response to user input; receiving userinput via the GUI indicating desired functionality for the node;automatically including graphical source code associated with the nodein the graphical program, wherein the automatically included graphicalsource code implements the desired functionality, and wherein thegraphical source code comprises a plurality of interconnected nodes thatvisually represent the desired functionality; and automatically creatingone or more user interface objects in the graphical program, whereinsaid automatically creating the one or more user interface objects inthe graphical program is performed without direct user input specifyingthe one or more user interface objects, wherein the one or more userinterface objects comprise a graphical user interface that is displayedduring execution of the graphical program, and wherein the one or moreuser interface objects perform one or more of providing user input to ordisplaying output from the graphical program during execution of thegraphical program; wherein said automatically including graphical sourcecode associated with the node in the graphical program comprisesautomatically including the graphical source code as a sub-program ofthe graphical program without direct user input specifying the pluralityof nodes or connections between the nodes, wherein the node representsthe sub-program.
 17. A non-transitory computer accessible memory mediumfor automatically generating a graphical program, the memory mediumcomprising program instructions executable to: display a graphical userinterface (GUI) on a display; receive user input to the GUI specifyingdesired functionality of the graphical program; and automaticallygenerate the graphical program in response to the user input specifyingthe functionality of the graphical program, wherein the graphicalprogram implements the specified functionality; wherein the graphicalprogram comprises a block diagram portion comprising a plurality ofinterconnected nodes, wherein the plurality of interconnected nodesvisually indicate functionality of the graphical program; wherein saidautomatically generating the graphical program includes generating theblock diagram portion without direct user input specifying the pluralityof nodes or connections between the nodes; and wherein saidautomatically generating the graphical program further includesautomatically creating one or more user interface objects in thegraphical program, wherein said automatically creating the one or moreuser interface objects in the graphical program is performed withoutdirect user input specifying the one or more user interface objects,wherein the one or more user interface objects comprise a graphical userinterface that is displayed during execution of the graphical program,and wherein the one or more user interface objects perform one or moreof providing user input to or displaying output from the graphicalprogram during execution of the graphical program.
 18. Thenon-transitory computer accessible memory medium of claim 17, whereinthe GUI comprises information useable in guiding a user in creation of aprogram.
 19. The non-transitory computer accessible memory medium ofclaim 17, wherein the GUI comprises one or more GUI input panels;wherein the user input to the GUI comprises user input to each of theone or more GUI input panels.
 20. The non-transitory computer accessiblememory medium of claim 19, wherein the program instructions executableto display the GUI and the program instructions executable to receiveuser input to the GUI comprise program instructions executable to:display a first GUI input panel on the display, wherein the first GUIinput panel includes one or more first fields adapted to receive userinput specifying first functionality of the graphical program; receivefirst user input specifying first functionality of the graphicalprogram; display a second GUI input panel on the display, wherein thesecond GUI input panel includes one or more second fields adapted toreceive user input specifying second functionality of the graphicalprogram; receive second user input specifying second functionality ofthe graphical program.
 21. The non-transitory computer accessible memorymedium of claim 20, wherein the second GUI input panel is one of aplurality of possible second GUI input panels, wherein the second GUIinput panel is displayed based on the first user input.
 22. Thenon-transitory computer accessible memory medium of claim 17, whereinsaid automatically generating the graphical program creates thegraphical program without any user input specifying the new graphicalprogram during said creating.
 23. The non-transitory computer accessiblememory medium of claim 17, wherein the program instructions executableto automatically generate the graphical program comprise programinstructions executable to: automatically create a plurality ofgraphical program objects in the graphical program; and automaticallyinterconnect the plurality of graphical program objects in the graphicalprogram; wherein the interconnected plurality of graphical programobjects comprise at least a portion of the graphical program.
 24. Thenon-transitory computer accessible memory medium of claim 17, whereinthe user input received specifies an instrumentation function; whereinthe automatically generated graphical program implements the specifiedinstrumentation function.
 25. The non-transitory computer accessiblememory medium of claim 24, wherein the instrumentation functioncomprises one or more of: a test and measurement function; or anindustrial automation function.
 26. A computer-implemented method forautomatically generating a graphical program, the method comprising:displaying a graphical user interface (GUI) on a display; receiving userinput to the GUI specifying desired functionality of the graphicalprogram; executing a graphical program generation (GPG) program; the GPGprogram receiving the user input, wherein the user input specifies thedesired functionality of the new graphical program; and the GPG programautomatically generating the graphical program in response to the userinput specifying the functionality of the graphical program, wherein thegraphical program implements the specified functionality; wherein thegraphical program comprises a block diagram portion comprising aplurality of interconnected nodes, wherein the plurality ofinterconnected nodes visually indicate functionality of the graphicalprogram; wherein said automatically generating the graphical programincludes generating the block diagram portion without direct user inputspecifying the plurality of nodes or connections between the nodes; andwherein said automatically generating the graphical program furtherincludes automatically creating one or more user interface objects inthe graphical program, wherein the one or more user interface objectscomprise a graphical user interface that is displayed during executionof the graphical program, wherein said automatically generating thegraphical program includes generating the graphical user interfacewithout direct user input specifying the one or more user interfaceobjects, and wherein the one or more user interface objects perform oneor more of providing user input to or displaying output from thegraphical program during execution of the graphical program.
 27. Acomputer-implemented method for automatically generating a graphicalprogram, the method comprising: displaying a graphical user interface(GUI) on a display; receiving user input to the GUI indicating desiredprogram operation of the graphical program; executing a graphicalprogram generation (GPG) program; the GPG program receiving the userinput, wherein the user input indicates desired operation of thegraphical program; and the GPG program automatically generating thegraphical program in response to the user input indicating the desiredoperation of the graphical program, wherein the graphical programimplements the desired operation; wherein the graphical programcomprises a block diagram portion comprising a plurality ofinterconnected nodes, wherein the plurality of interconnected nodesvisually indicate functionality of the graphical program; wherein saidautomatically generating the graphical program includes generating theblock diagram portion without direct user input specifying the pluralityof nodes or connections between the nodes; and wherein saidautomatically generating the graphical program further includesautomatically creating one or more user interface objects in thegraphical program, wherein the one or more user interface objectscomprise a graphical user interface that is displayed during executionof the graphical program, wherein said automatically generating thegraphical program includes generating the graphical user interfacewithout direct user input specifying the one or more user interfaceobjects, and wherein the one or more user interface objects perform oneor more of providing user input to or displaying output from thegraphical program during execution of the graphical program.
 28. Themethod of claim 27, wherein the GPG program comprises a graphicalprogramming development environment application.
 29. The method of claim27, wherein the GPG program is operable to generate a plurality ofgraphical programs, depending on the received user input.